import { request } from '@/utils/http';

/**
 * 登录
 * @param params
 */
export function login(params: LoginParams) {
  return request.Post<LoginModel>('/api/login', params, {
    meta: {
      ignoreAuth: true,
    },
  });
}

/**
 * 登出
 */
export function logout() {
  return request.Post('/api/logout', {});
}

/**
 * 刷新token
 */
export function refreshToken() {
  return request.Post<LoginModel>('api/refreshToken', {});
}

export function test() {
  return request.Get('/test', {
    meta: {
      ignoreAuth: true,
    },
  });
}
